﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Classes.util {
    import flash.utils.*;
    import flash.external.*;

    public class RuntimeVariableManager {

        private static var m_runtimeVars:Dictionary;

        public static function init():void{
            var _local2:String;
            var _local1:Object = ExternalInterface.call("getRuntimeVars");
            m_runtimeVars = new Dictionary();
            if (_local1){
                for (_local2 in _local1) {
                    m_runtimeVars[_local2] = _local1[_local2];
                };
            };
        }
        public static function getInt(_arg1:String, _arg2:int):int{
            return ((getValue(_arg1, _arg2, int) as int));
        }
        public static function getString(_arg1:String, _arg2:String):String{
            return ((getValue(_arg1, _arg2, String) as String));
        }
        public static function getBoolean(_arg1:String, _arg2:Boolean):Boolean{
            return ((getValue(_arg1, _arg2, Boolean) as Boolean));
        }
        public static function getArray(_arg1:String, _arg2:Array):Array{
            return ((getValue(_arg1, _arg2, Array) as Array));
        }
        private static function getValue(_arg1:String, _arg2:Object, _arg3:Class):Object{
            var _local4:Object = _arg2;
            if (((((m_runtimeVars) && (m_runtimeVars.hasOwnProperty(_arg1)))) && ((m_runtimeVars[_arg1] is _arg3)))){
                _local4 = m_runtimeVars[_arg1];
            };
            return (_local4);
        }

    }
}//package Classes.util 
